<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	span{
		color:yellow;
	}
	/* 将含有p标签的span设置为红色，其他span标签不变 */
	p span{
		color:red;
	}
</style>
</head>
<body>
<div>一层<p>二层<span>三层</span></p></div>
<span>二代</span><br/>
<div>三代</div><br/>
</body>
</html>